package br.siseventos.model;
// Generated 18/08/2012 11:34:56 by Hibernate Tools 3.2.1.GA


import java.util.HashSet;
import java.util.Set;
import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import static javax.persistence.GenerationType.IDENTITY;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.OneToMany;
import javax.persistence.Table;

/**
 * TbInscricao generated by hbm2java
 */
@Entity
@Table(name="tb_inscricao"
    ,catalog="SisEventosDB"
)
public class TbInscricao  implements java.io.Serializable {


     private Integer idtInscricao;
     private TbEvento tbEvento;
     private TbParticipante tbParticipante;
     private TdPapel tdPapel;
     private char stsAvaliacaoInscricao;
     private String obsAvaliacaoInscricao;
     private Set<TaAvaliacao> taAvaliacaos = new HashSet<TaAvaliacao>(0);
     private Set<TaParticipacao> taParticipacaos = new HashSet<TaParticipacao>(0);

    public TbInscricao() {
    }

	
    public TbInscricao(TbEvento tbEvento, TbParticipante tbParticipante, TdPapel tdPapel, char stsAvaliacaoInscricao) {
        this.tbEvento = tbEvento;
        this.tbParticipante = tbParticipante;
        this.tdPapel = tdPapel;
        this.stsAvaliacaoInscricao = stsAvaliacaoInscricao;
    }
    public TbInscricao(TbEvento tbEvento, TbParticipante tbParticipante, TdPapel tdPapel, char stsAvaliacaoInscricao, String obsAvaliacaoInscricao, Set<TaAvaliacao> taAvaliacaos, Set<TaParticipacao> taParticipacaos) {
       this.tbEvento = tbEvento;
       this.tbParticipante = tbParticipante;
       this.tdPapel = tdPapel;
       this.stsAvaliacaoInscricao = stsAvaliacaoInscricao;
       this.obsAvaliacaoInscricao = obsAvaliacaoInscricao;
       this.taAvaliacaos = taAvaliacaos;
       this.taParticipacaos = taParticipacaos;
    }
   
     @Id @GeneratedValue(strategy=IDENTITY)
    
    @Column(name="idt_inscricao", unique=true, nullable=false)
    public Integer getIdtInscricao() {
        return this.idtInscricao;
    }
    
    public void setIdtInscricao(Integer idtInscricao) {
        this.idtInscricao = idtInscricao;
    }
@ManyToOne(fetch=FetchType.LAZY)
    @JoinColumn(name="cod_evento", nullable=false)
    public TbEvento getTbEvento() {
        return this.tbEvento;
    }
    
    public void setTbEvento(TbEvento tbEvento) {
        this.tbEvento = tbEvento;
    }
@ManyToOne(fetch=FetchType.LAZY)
    @JoinColumn(name="cod_participante", nullable=false)
    public TbParticipante getTbParticipante() {
        return this.tbParticipante;
    }
    
    public void setTbParticipante(TbParticipante tbParticipante) {
        this.tbParticipante = tbParticipante;
    }
@ManyToOne(fetch=FetchType.LAZY)
    @JoinColumn(name="cod_papel", nullable=false)
    public TdPapel getTdPapel() {
        return this.tdPapel;
    }
    
    public void setTdPapel(TdPapel tdPapel) {
        this.tdPapel = tdPapel;
    }
    
    @Column(name="sts_avaliacao_inscricao", nullable=false, length=1)
    public char getStsAvaliacaoInscricao() {
        return this.stsAvaliacaoInscricao;
    }
    
    public void setStsAvaliacaoInscricao(char stsAvaliacaoInscricao) {
        this.stsAvaliacaoInscricao = stsAvaliacaoInscricao;
    }
    
    @Column(name="obs_avaliacao_inscricao", length=512)
    public String getObsAvaliacaoInscricao() {
        return this.obsAvaliacaoInscricao;
    }
    
    public void setObsAvaliacaoInscricao(String obsAvaliacaoInscricao) {
        this.obsAvaliacaoInscricao = obsAvaliacaoInscricao;
    }
@OneToMany(cascade=CascadeType.ALL, fetch=FetchType.LAZY, mappedBy="tbInscricao")
    public Set<TaAvaliacao> getTaAvaliacaos() {
        return this.taAvaliacaos;
    }
    
    public void setTaAvaliacaos(Set<TaAvaliacao> taAvaliacaos) {
        this.taAvaliacaos = taAvaliacaos;
    }
@OneToMany(cascade=CascadeType.ALL, fetch=FetchType.LAZY, mappedBy="tbInscricao")
    public Set<TaParticipacao> getTaParticipacaos() {
        return this.taParticipacaos;
    }
    
    public void setTaParticipacaos(Set<TaParticipacao> taParticipacaos) {
        this.taParticipacaos = taParticipacaos;
    }




}


